<template>
  <div class="app-container">
    <el-tabs type="border-card" @tab-click="handleClick">
      <el-tab-pane label="全部线索">
        <div class="filter-container">
          <el-select
            v-model="listQuery.loanLimit"
            clearable
            placeholder="额度"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="20万" label="20万"></el-option>
            <el-option value="10万" label="10万"></el-option>
            <el-option value="5万" label="5万"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.education"
            clearable
            placeholder="学历"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="本科及以上" label="本科及以上"></el-option>
            <el-option value="大专" label="大专"></el-option>
            <el-option value="中专" label="中专"></el-option>
            <el-option value="高中及以下" label="高中及以下"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.occupation"
            clearable
            placeholder="职业"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="公务员/国企" label="公务员/国企"></el-option>
            <el-option value="私营企业主" label="私营企业主"></el-option>
            <el-option value="上班族" label="上班族"></el-option>
            <el-option value="自由职业" label="自由职业"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.socialSecurity"
            clearable
            placeholder="本地社保"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="无本地社保" label="无本地社保"></el-option>
            <el-option value="6个月以下" label="6个月以下"></el-option>
            <el-option value="6个月以上" label="6个月以上"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.accumulation"
            clearable
            placeholder="本地公积金"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="无本地公积金" label="无本地公积金"></el-option>
            <el-option value="6个月以下" label="6个月以下"></el-option>
            <el-option value="6个月以上" label="6个月以上"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.insurance"
            clearable
            placeholder="投保信息"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="投保两年以上" label="投保两年以上"></el-option>
            <el-option value="投保两年以下" label="投保两年以下"></el-option>
            <el-option value="无" label="无"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.car"
            clearable
            placeholder="车产"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="有" label="有"></el-option>
            <el-option value="无" label="无"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.house"
            clearable
            placeholder="房产"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="有" label="有"></el-option>
            <el-option value="无" label="无"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.sesameSeed"
            clearable
            placeholder="芝麻分范围"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="700分以上" label="700分以上"></el-option>
            <el-option value="650-699分" label="650-699分"></el-option>
            <el-option value="600-649分" label="600-649分"></el-option>
            <el-option value="600分以下" label="600分以下"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.creditCard"
            clearable
            placeholder="信用卡额度"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="3万以上" label="3万以上"></el-option>
            <el-option value="1-3万" label="1-3万"></el-option>
            <el-option value="1万以下" label="1万以下"></el-option>
            <el-option value="无信用卡" label="无信用卡"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.huabei"
            clearable
            placeholder="花呗额度"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="额度10000以上" label="额度10000以上"></el-option>
            <el-option value="5000-10000" label="5000-10000"></el-option>
            <el-option value="0-5000" label="0-5000"></el-option>
            <el-option value="无" label="无"></el-option>
          </el-select>
          <el-select
            v-model="listQuery.whiteStripe"
            clearable
            placeholder="白条额度"
            style="width: 250px;"
            class="filter-item"
          >
            <el-option value="额度5000以上" label="额度5000以上"></el-option>
            <el-option value="2000-5000" label="2000-5000"></el-option>
            <el-option value="0-2000" label="0-2000"></el-option>
            <el-option value="无" label="无"></el-option>
          </el-select>
          <div>
            <el-date-picker
              v-model="alltimes2"
              class="filter-item"
              start-placeholder="提交开始时间"
              end-placeholder="提交结束时间"
              style="width: 250px;"
              type="datetimerange"
              value-format="yyyy-MM-dd HH:mm:ss"
            />
            <el-date-picker
              v-model="alltimes1"
              class="filter-item"
              start-placeholder="推送开始时间"
              end-placeholder="推送结束时间"
              style="width: 350px;"
              type="datetimerange"
              value-format="yyyy-MM-dd HH:mm:ss"
            />
            <el-input
              v-model="listQuery.city"
              placeholder="城市"
              style="width: 120px;"
              class="filter-item"
              @keyup.enter.native="handleFilter"
            />
            <el-select
              v-model="listQuery.overdueSituation"
              clearable
              placeholder="有无逾期"
              style="width: 250px;"
              class="filter-item"
            >
              <el-option value="有" label="有"></el-option>
              <el-option value="无" label="无"></el-option>
            </el-select>
            <!-- <el-select
            v-model="listQuery.userSource"
            clearable
            placeholder="渠道来源"
            style="width: 150px;"
            class="filter-item"
            filterable 
          >
            <el-option
              v-for="(item, index) in selectArr1"
              :key="index"
              :value="item"
              :label="item"
            >
              {{ item }}
            </el-option>
          </el-select> -->

            <el-autocomplete
              class="inline-input"
              v-model="listQuery.userSource"
              :fetch-suggestions="querySearch"
              placeholder="请选择渠道来源"
              @select="handleSelect"
            ></el-autocomplete>
            <el-input
              size="medium"
              placeholder="请输入机构名称"
              v-model="listQuery.insuranceName"
              style="width: 200px;"
              clearable
            >
            </el-input>
            <el-button
              v-waves
              class="filter-item"
              type="primary"
              icon="el-icon-search"
              @click="handleFilter"
              style="float:right"
            >
              搜索
            </el-button>
          </div>
        </div>
        <el-table
          :key="tableKey"
          v-loading="listLoading"
          :data="tableData"
          border
          fit
          highlight-current-row
          style="width: 100%;"
        >
          <el-table-column label="userId" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.userId }}</span>
            </template>
          </el-table-column>
          <el-table-column label="姓名" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.name }}</span>
            </template>
          </el-table-column>
          <el-table-column label="城市" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.city }}</span>
            </template>
          </el-table-column>
          <el-table-column label="额度" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.newLoanLimit }}</span>
            </template>
          </el-table-column>

          <el-table-column label="职业" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.occupation }}</span>
            </template>
          </el-table-column>
          <el-table-column label="本地社保" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.socialSecurity }}</span>
            </template>
          </el-table-column>
          <el-table-column label="本地公积金" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.accumulation }}</span>
            </template>
          </el-table-column>
          <el-table-column label="投保信息" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.insurance }}</span>
            </template>
          </el-table-column>
          <el-table-column label="车产" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.car }}</span>
            </template>
          </el-table-column>
          <el-table-column label="房产" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.house }}</span>
            </template>
          </el-table-column>
          <el-table-column label="逾期信息" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.overdueSituation }}</span>
            </template>
          </el-table-column>
          <el-table-column label="芝麻分" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.newSesameSeed }}</span>
            </template>
          </el-table-column>
          <el-table-column label="花呗" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.huabei }}</span>
            </template>
          </el-table-column>
          <el-table-column label="京东" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.whiteStripe }}</span>
            </template>
          </el-table-column>
          <el-table-column label="投放机构" min-width="100" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.channel }}</span>
            </template>
          </el-table-column>
          <!-- <el-table-column label="匹配机构数" min-width="100" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.matchingNumber }}</span>
            </template>
          </el-table-column> -->
          <el-table-column label="用户渠道来源" min-width="150" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.channelSource }}</span>
            </template>
          </el-table-column>
          <el-table-column label="失败原因" min-width="150" align="center">
            <el-popover
              placement="top-start"
              title="失败原因"
              width="200"
              trigger="hover"
              slot-scope="{ row }"
            >
              <span>{{ row.score }}</span>
              <el-button slot="reference" class="errorInfo">{{
                row.score
              }}</el-button>
            </el-popover>
          </el-table-column>
          <el-table-column label="提交时间" min-width="150" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.creatTime }}</span>
            </template>
          </el-table-column>
          <el-table-column label="投放时间" min-width="150" align="center">
            <template slot-scope="{ row }">
              <span>{{ row.putTime }}</span>
            </template>
          </el-table-column>
          <el-table-column label="信息" min-width="80" align="center">
            <template slot-scope="{ row }">
              <span style="color:blue" @click="analyseAll(row)">线索分析</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150" align="center">
            <template slot-scope="{ row }">
              <span style="color:blue" @click="send(row)">发送线索</span>
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="listQuery.current"
          :limit.sync="listQuery.size"
          @pagination="statisticalSep"
        />
        <el-dialog
          :visible.sync="dialogVisible"
          title="发送线索"
          :before-close="closeSend"
        >
          <div>
            <div class="a1">匹配展示机构：</div>
            <div>
              <el-checkbox-group
                v-model="allList"
                v-for="item in allClueChannel"
                :key="item.mechanismId"
              >
                <el-checkbox :label="item" :disabled="!item.checked"
                  >{{ item.mechanisName
                  }}<span style="margin-left: 10px;color:rgb(2, 72, 223);"
                    >曝光:{{ item.price }}</span
                  ></el-checkbox
                >
              </el-checkbox-group>
            </div>
          </div>
          <!-- <div style="display:flex">
            <div class="a1">签署协议机构：</div>
            <div
              v-for="item in allSignList"
              :key="item.id"
              style="margin-left:20px"
            >
              {{ item.mechanisName }}
            </div>
          </div> -->
          <span slot="footer" class="dialog-footer">
            <el-button type="info" @click="dialogVisible = false"
              >取消</el-button
            >
            <el-button type="primary" @click="submitSend()"
              >确定并发送</el-button
            >
          </span>
        </el-dialog>
        <el-dialog :visible.sync="dialogPvVisible1" title="线索分析">
          <div style="display:flex">
            <div>
              <el-form
                ref="allclueData"
                :model="allclueData"
                label-width="100px"
              >
                <el-form-item label="姓名">
                  <el-input v-model="allclueData.name"></el-input>
                </el-form-item>
                <el-form-item label="性别">
                  <el-input
                    v-show="allclueData.sex == 1"
                    v-model="nan"
                    readonly
                  ></el-input>
                  <el-input
                    v-show="allclueData.sex == 2"
                    v-model="nv"
                  ></el-input>
                </el-form-item>
                <el-form-item label="年龄">
                  <el-input v-model="allclueData.age"></el-input>
                </el-form-item>
                <el-form-item label="借多少">
                  <el-select
                    v-model="allclueData.newLoanLimit"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[0]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>

                <el-form-item label="省份">
                  <el-input v-model="allclueData.province"></el-input>
                </el-form-item>
                <el-form-item label="城市">
                  <el-input v-model="allclueData.city"></el-input>
                </el-form-item>
                <el-form-item label="芝麻分">
                  <el-select
                    v-model="allclueData.newSesameSeed"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[1]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="学历">
                  <el-select
                    v-model="allclueData.education"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[2]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="逾期">
                  <el-select
                    v-model="allclueData.overdueSituation"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[3]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-form>
            </div>

            <div>
              <el-form
                ref="allclueData"
                :model="allclueData"
                label-width="100px"
              >
                <el-form-item label="职业">
                  <el-select
                    v-model="allclueData.occupation"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[4]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="社保缴纳">
                  <el-select
                    v-model="allclueData.socialSecurity"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[5]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="公积金">
                  <el-select
                    v-model="allclueData.accumulation"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[6]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="投保">
                  <el-select
                    v-model="allclueData.insurance"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[7]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="车产">
                  <el-select v-model="allclueData.car" placeholder="请选择">
                    <el-option
                      v-for="item in information[8]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="房产">
                  <el-select v-model="allclueData.house" placeholder="请选择">
                    <el-option
                      v-for="item in information[9]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="信用卡">
                  <el-select
                    v-model="allclueData.creditCard"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[10]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="花呗">
                  <el-select v-model="allclueData.huabei" placeholder="请选择">
                    <el-option
                      v-for="item in information[11]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                      name="huabei"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="白条">
                  <el-select
                    v-model="allclueData.whiteStripe"
                    placeholder="请选择"
                  >
                    <el-option
                      v-for="item in information[12]"
                      :key="item.value"
                      :label="item.text"
                      :value="item.value"
                      name="whiteStripe"
                    >
                    </el-option>
                  </el-select>
                </el-form-item>
              </el-form>
            </div>
          </div>
          <span slot="footer" class="dialog-footer">
            <el-button type="primary" @click="update()">确定</el-button>
          </span>
        </el-dialog>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import {
  allGetById,
  updateZdClubLog,
  pushTOSendClues,
  getChannelSourceBySource,
  pushTOSendCluesDetails,
  allUserClues,
  getChannelSourceBySource1,
  insition
} from '@/api/advertising';
import waves from '@/directive/waves'; // waves directive
import Pagination from '@/components/Pagination'; // secondary package based on el-pagination
export default {
  name: 'CountChannel',
  components: { Pagination },
  directives: { waves },
  data() {
    return {
      nan: '男',
      nv: '女',
      alltimes1: [],
      alltimes2: [],
      tableData: [],
      tableKey: 0,
      total: 0,

      listQuery: {
        startTime: '',
        endTime: '',
        current: 1,
        size: 10,
        loanLimit: '',
        education: '',
        occupation: '',
        socialSecurity: '',
        accumulation: '',
        insurance: '',
        car: '',
        house: '',
        sesameSeed: '',
        creditCard: '',
        huabei: '',
        whiteStripe: '',
        city: '',
        overdueSituation: '',
        userSource: '',
        insuranceName: '',
        putEndTime: '',
        putStartTime: ''
      },
      dialogPvVisible: false,
      dialogPvVisible1: false,
      tabActive: '0',
      listLoading: false,
      allclueData: {
        name: '',
        sex: '',
        age: '',
        newLoanLimit: '',
        province: '',
        city: '',
        newSesameSeed: '',
        education: '',
        overdueSituation: '',
        occupation: '',
        socialSecurity: '',
        accumulation: '',
        insurance: '',
        car: '',
        house: '',
        creditCard: '',
        huabei: '',
        whiteStripe: ''
      },
      selectArr: [],
      selectArr1: [],
      dialogVisible: false,

      allClueChannel: [],
      allChannel: [],
      allList: [],
      allSignList: [],
      allSendId: '',
      allSendUserId: '',

      xyData: [],
      htmlContent: '',
      insitionList: [],
      information: [
        [
          { text: '5万', value: '5万' },
          { text: '10万', value: '10万' },
          { text: '20万', value: '20万' }
        ],
        [
          { text: '700分以上', value: '700分以上' },
          { text: '650-699分', value: '650-699分' },
          { text: '600-649分', value: '600-649分' },
          { text: '600分以下', value: '600分以下' }
        ],
        [
          { text: '高中及以下', value: '高中及以下' },
          { text: '中专', value: '中专' },
          { text: '大专', value: '大专' },
          { text: '本科及以上', value: '本科及以上' }
        ],
        [
          { text: '当前有逾期', value: '当前有逾期' },
          { text: '无逾期', value: '无逾期' }
        ],
        [
          { text: '公务员/国企', value: '公务员/国企' },
          { text: '私营企业主', value: '私营企业主' },
          { text: '上班族', value: '上班族' },
          { text: '自由职业', value: '自由职业' }
        ],
        [
          { text: '无本地社保', value: '无本地社保' },
          { text: '6个月以下', value: '6个月以下' },
          { text: '6个月以上', value: '6个月以上' }
        ],
        [
          { text: '无本地公积金', value: '无本地公积金' },
          { text: '6个月以下', value: '6个月以下' },
          { text: '6个月以上', value: '6个月以上' }
        ],
        [{ text: '有', value: '有' }, { text: '无', value: '无' }],
        [{ text: '有', value: '有' }, { text: '无', value: '无' }],
        [{ text: '有', value: '有' }, { text: '无', value: '无' }],
        [
          { text: '3万以上', value: '3万以上' },
          { text: '1-3万', value: '1-3万' },
          { text: '1万以下', value: '1万以下' },
          { text: '无信用卡', value: '无信用卡' }
        ],
        [
          { text: '额度10000以上', value: '额度10000以上' },
          { text: '5000-10000', value: '5000-10000' },
          { text: '0-5000', value: '0-5000' },
          { text: '无', value: '无' }
        ],
        [
          { text: '额度5000以上', value: '额度5000以上' },
          { text: '2000-5000', value: '2000-5000' },
          { text: '0-2000', value: '0-2000' },
          { text: '无', value: '无' }
        ]
      ]
    };
  },
  created() {
    this.statisticalSep();
  },
  mounted() {
    this.getArr1();
  },
  methods: {
    handleClick(tab) {
      this.tabActive = tab.index;
      this.handleFilter();
    },
    // 获取列表
    async statisticalSep() {
      const res = await allUserClues(this.listQuery);
      this.tableData = res.data.data.records;
      console.log(res.data.data, 'pppp');
      this.total = res.data.data.total;
    },
    // 获取渠道来源列表数据
    async getArr() {
      const res = await getChannelSourceBySource({
        source: this.listQuery.source
      });
      this.selectArr = res.data.data;
      this.listQuery.channelSource = '';
    },
    async getArr1() {
      const res = await getChannelSourceBySource1({});
      const a = res.data.data;
      this.selectArr1 = a.map(item => ({ value: item }));
      console.log(this.selectArr1);
    },
    querySearch(queryString, cb) {
      var restaurants = this.selectArr1;
      var results = queryString
        ? restaurants.filter(this.createFilter(queryString))
        : restaurants;
      // 调用 callback 返回建议列表的数据
      cb(results);
    },
    createFilter(queryString) {
      return restaurant => {
        return (
          restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) ===
          0
        );
      };
    },
    async analyseAll(row) {
      this.dialogPvVisible1 = true;
      const res = await allGetById({ id: row.id });
      this.allclueData = res.data.data;
    },
    closeSend() {
      this.dialogVisible = false;
    },
    submitSend() {
      const Data = {
        id: this.allSendId,
        userId: this.allSendUserId,
        mechanismList: this.allList,
        signList: this.allSignList
      };
      pushTOSendClues(Data).then(res => {
        if (res.data.code === 200) {
          this.$notify({
            title: 'Success',
            message: '发送成功',
            type: 'success',
            duration: 2000
          });
        } else {
          this.$notify({
            title: 'fail',
            message: res.data.msg,
            type: 'fail',
            duration: 2000
          });
        }
        this.dialogVisible = false;
        this.statisticalSep();
      });
    },

    send(row) {
      this.allList = [];
      this.allSignList = [];
      this.allSendId = row.id;
      this.allSendUserId = row.userId;
      this.dialogVisible = true;
      pushTOSendCluesDetails({ id: row.id }).then(res => {
        if (res.data.code === 200) {
          this.allClueChannel = res.data.data.mechanismList;
          this.allChannel = res.data.data.mechanismList;
        }
      });
      insition({ userId: row.userId }).then(res => {
        this.insitionList = res.data.data;
      });
    },
    // 搜索
    handleFilter() {
      if (this.alltimes1 == null) {
        this.listQuery.putEndTime = '';
        this.listQuery.putStartTime = '';
      } else if (this.alltimes1.length === 0) {
        this.listQuery.putEndTime = '';
        this.listQuery.putStartTime = '';
      } else {
        this.listQuery.putEndTime = this.alltimes1[1];
        this.listQuery.putStartTime = this.alltimes1[0];
      }
      if (this.alltimes2 == null) {
        this.listQuery.endTime = '';
        this.listQuery.startTime = '';
      } else if (this.alltimes2.length === 0) {
        this.listQuery.endTime = '';
        this.listQuery.startTime = '';
      } else {
        this.listQuery.endTime = this.alltimes2[1];
        this.listQuery.startTime = this.alltimes2[0];
      }
      if (this.tabActive === '0') {
        this.statisticalSep(this.listQuery);
      }
    },
    update() {
      this.dialogPvVisible1 = false;
      updateZdClubLog(this.allclueData).then(res => {
        if (res.data.code === 200) {
          this.$notify({
            title: 'Success',
            message: '更新成功',
            type: 'success',
            duration: 2000
          });
          // this.getChannelDevice(this.listQuery);
        } else {
          this.$notify({
            title: 'fail',
            message: '更新失败',
            type: 'fail',
            duration: 2000
          });
        }
      });
    }
  }
};
</script>

<style scoped>
.cap {
  opacity: 0.5;
}
.a1 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
}
.errorInfo {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 130px;
}
</style>
